/*
Author: Maciej Oczko
Date: December 2011
*/

#ifndef DXTEXTURE_H
#define DXTEXTURE_H

#include <cassert>
#include <D3D9.h>
#include <DXUT.h>
#include "Texture.h"
#include "Trace.h"

class DXTexture : public Texture
{
private:
	// DirectX texture pointer
	LPDIRECT3DTEXTURE9 m_pTexture;

	bool Load();
public:
	DXTexture() {}
	virtual ~DXTexture();

	// loads texture from file
	bool Load(std::wstring p_FilePath);
	// unloads texture
	void Unload();
	// reloads texture
	bool Reload();

	LPDIRECT3DTEXTURE9 GetTexture() { Resource::Touch(); return m_pTexture; } 
	// get size of texture in memory
	size_t GetSize();
};

#endif